package com.codewsq.sup;

import org.junit.Test;

import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;

public class Person {

    int id;
    int age;

    String name;

    public <T> int eat() {
        System.out.println("人类都吃啥");
        return 0;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Person person = (Person) o;
        return id == person.id && age == person.age && name.equals(person.name);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, age, name);
    }


    @Test
    public void test(){
        List<Person> list = Arrays.asList(new Person());
        generateFile(list);
    }
    public <T extends Person> File  generateFile(List<T> list){

        return  null;
    }
}
